import axios from 'axios'
import { Promise } from 'es6-promise'

export default {
  getGoods(sellId, cb) {
    axios.get('/api/goods?sellerid=' + sellId)
      .then((response) => {
        if (response && response.data.errno === 0) {
          const reData = response.data.data
          reData.id = sellId
          cb(reData)
        }
      })
      .catch((error) => {
        console.log(error);
      });
  },
}
